package com.bjx.api.system.service;


import com.bjx.api.system.domain.vo.DictDataVO;
import com.bjx.api.system.service.fallback.RemoteDictFallBack;
import com.bjx.common.core.constant.ServiceNameConst;
import com.bjx.common.core.domain.R;
import com.bjx.common.security.interceptor.FeignInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @desc: 远程字典调用
 * @author: liushuai
 * @date: 2022/9/22 16:51
 */
@FeignClient(name = ServiceNameConst.SYSTEM,fallback = RemoteDictFallBack.class,path = "/dict",configuration = FeignInterceptor.class)
public interface RemoteDictService {

    /**
     * 根据字典类型编号查询字典数据
     * @param dictTypeCode
     * @return: com.bjx.common.core.domain.R<java.util.List<com.bjx.system.domain.vo.DictDataVO>>
     * @Author: liushuai
     * @Date: 2022/8/16
     */
    @GetMapping("/data/listCacheDictDataByDictTypeCode")
    R<List<DictDataVO>> listCacheDictDataByDictTypeCode(@RequestParam String dictTypeCode);
}
